"use strict";
//导包
const express = require('express')
const bodyParser = require('body-parser')
const path = require('path')

const app = express()

//解析post数据
app.use(bodyParser.urlencoded({extended: false}))

//设置静态资源文件夹
app.use(express.static('./src/statics'))

//导入路由
const accountRouter = require('./src/routers/accountRouter.js')
const studentRoutes = require('./src/routers/studentmanagerRouter.js')
app.use('/account', accountRouter)//登入界面
app.use('/studentmanager', studentRoutes)//学生管理之学生列表

app.listen(3001, '127.0.0.1', err => {
    if (err) console.log(err);
    console.log('ok html');
})